package com.wavehi.classloader;

import sun.management.resources.agent;
import sun.misc.Launcher;

import java.net.URL;

/**
 * @Author WaveHi
 * @Date 1/10/2021 下午 8:23
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Demonstrate the use of bootstrap class loader.
 */
public class BootstrapClassLoaderDemo {
    public static void main(String[] args) {
        //Get the class that bootstrap class loader will loader.
        URL[] urLs = Launcher.getBootstrapClassPath().getURLs();
        for (URL urL : urLs) {
            System.out.println(urL);
        }
//        file:/D:/java/openJDK8/subject/jre/lib/resources.jar
//        file:/D:/java/openJDK8/subject/jre/lib/rt.jar
//        file:/D:/java/openJDK8/subject/jre/lib/sunrsasign.jar
//        file:/D:/java/openJDK8/subject/jre/lib/jsse.jar
//        file:/D:/java/openJDK8/subject/jre/lib/jce.jar
//        file:/D:/java/openJDK8/subject/jre/lib/charsets.jar
//        file:/D:/java/openJDK8/subject/jre/lib/jfr.jar
//        file:/D:/java/openJDK8/subject/jre/classes
    }
}
